/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package data.access;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

/**
 *
 * @author duongna
 */
public class HometownDAO extends DataDAO {
    public static ArrayList<String> getHometownList(String filename) {
        ArrayList<String> hometownList = new ArrayList<String>();
        BufferedReader in = null;
        try {
            in = new BufferedReader(
                    new FileReader(filename));            
            String line = null;
            while ((line = in.readLine()) != null) {
                hometownList.add(line);
            }
            return hometownList;
        } catch (IOException e) {
            e.printStackTrace();
            return null;
        } finally {
            if (in != null) {
                try {
                    in.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

        
    }
}
